package com.deng.framework.beans.factory.xml;

import com.deng.framework.beans.BeansException;
import com.deng.framework.beans.factory.support.BeanDefinitionRegistry;
import com.deng.framework.core.io.Resource;
import com.deng.framework.core.io.ResourceLoader;

/**
 * 实现资源加载器的总接口，依赖了ResourceLoader实现文件的读取，依赖了BeanRegistry实现将Bean注册到BeanFactory中
 */
public interface BeanDefinitionReader {
    BeanDefinitionRegistry getRegistry();

    ResourceLoader getResourceLoader();

    //实现文件分析注册的三个重写函数
    void loadBeanDefinitions(Resource resource) throws BeansException;

    void loadBeanDefinitions(Resource... resources) throws BeansException;

    void loadBeanDefinitions(String location) throws BeansException;

    void loadBeanDefinitions(String... locations) throws BeansException;

}
